//
//  DrawView.m
//  BaseFrame
//
//  Created by 孟学浩 on 2017/1/22.
//  Copyright © 2017年 com.mxh. All rights reserved.
//

#import "DrawView.h"

@implementation DrawView

- (instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        self.backgroundColor = [UIColor whiteColor];
    }
    return self;
}


- (void)drawRect:(CGRect)rect{
    [super drawRect:rect];

    
    
    
    NSString *dateStr = @"mengx\nuehao";
    
    NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
    paragraphStyle.lineHeightMultiple = 50.0f;
    paragraphStyle.maximumLineHeight = 50.0f;
    paragraphStyle.minimumLineHeight = 50.0f;

    
    NSDictionary *attributes = @{
                                 NSFontAttributeName:DEF_FontSize_12,
                                 NSForegroundColorAttributeName:[UIColor redColor]
                                 };
    [dateStr drawAtPoint:CGPointMake(0, 150) withAttributes:attributes];
}

@end
